hip.math.utils

Undocumented in source.

Members

Enums

AxisNavigation
enum AxisNavigation
Undocumented in source.

Functions

abs
T abs(T val)
Undocumented in source. Be warned that the author may not have intended to support it.
abs
T abs(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
approximatelyEqual
bool approximatelyEqual(float from, float to, float error)
Undocumented in source. Be warned that the author may not have intended to support it.
ceil
float ceil(float val)
Undocumented in source. Be warned that the author may not have intended to support it.
ceil
T ceil(float val)
Undocumented in source. Be warned that the author may not have intended to support it.
clamp
T clamp(T value, T min, T max)
Undocumented in source. Be warned that the author may not have intended to support it.
convertDipsToPixels
int convertDipsToPixels(float dips, float dpi)
Undocumented in source. Be warned that the author may not have intended to support it.
cubicBezier
Vector2 cubicBezier(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t)
Undocumented in source. Be warned that the author may not have intended to support it.
cubicBezier
Vector2 cubicBezier(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float t)
Undocumented in source. Be warned that the author may not have intended to support it.
degToRad
float degToRad(float degrees)
Undocumented in source. Be warned that the author may not have intended to support it.
floor
float floor(float val)
Undocumented in source. Be warned that the author may not have intended to support it.
floor
T floor(float val)
Undocumented in source. Be warned that the author may not have intended to support it.
getClosestMultiple
int getClosestMultiple(int from, int to)
Undocumented in source. Be warned that the author may not have intended to support it.
greatestCommonDivisor
int greatestCommonDivisor(int a, int b)
Undocumented in source. Be warned that the author may not have intended to support it.
isPowerOf2
bool isPowerOf2(size_t num)
Undocumented in source. Be warned that the author may not have intended to support it.
lerp
float lerp(float from, float to, float t)
max
T max(T[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
min
T min(T[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
physicalPixelToDIPs
float physicalPixelToDIPs(int pixels, float dpi)
Undocumented in source. Be warned that the author may not have intended to support it.
quadraticBezier
Vector2 quadraticBezier(float x0, float y0, float x1, float y1, float x2, float y2, float t)
Undocumented in source. Be warned that the author may not have intended to support it.
quadraticBezier
Vector2 quadraticBezier(Vector2 p0, Vector2 p1, Vector2 p2, float t)
Undocumented in source. Be warned that the author may not have intended to support it.
radToDeg
float radToDeg(float radians)
Undocumented in source. Be warned that the author may not have intended to support it.
round
int round(float f)
Undocumented in source. Be warned that the author may not have intended to support it.
roundPow2
uint roundPow2(uint n)

Bit twiddling hacks

sum
T sum(T[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
toCircleBounds
Vector3 toCircleBounds(Vector3 v, float angle, AxisNavigation axis)
Undocumented in source. Be warned that the author may not have intended to support it.

Imports

cos (from core.math)
public import core.math : sqrt, cos, sin;

There are some errors occurring when compiling with LDC

sin (from core.math)
public import core.math : sqrt, cos, sin;

There are some errors occurring when compiling with LDC

sqrt (from core.math)
public import core.math : sqrt, cos, sin;

There are some errors occurring when compiling with LDC

Manifest constants

DEG_TO_RAD
enum DEG_TO_RAD;
Undocumented in source.
PI
enum PI;
Undocumented in source.
PI_2
enum PI_2;
Undocumented in source.
PI_4
enum PI_4;
Undocumented in source.
RAD_TO_DEG
enum RAD_TO_DEG;
Undocumented in source.
dipsPerInch
enum dipsPerInch;
Undocumented in source.

Meta